package com.wits.media;

/**
 * Created by zhengboyuan on 2018-03-25.
 */

public class LinearTimeStamp {

    protected long startTime;

    public LinearTimeStamp() {
        startTime = getTick();
    }

    public long get() {
        return getTick() - startTime;
    }

    public LinearTimeStamp reset() {
        startTime = getTick();
        return this;
    }

    private long getTick() {
        return System.nanoTime() / 1000;
    }


}
